package com.jhgsys.internal.hazard.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;


/**
 *  Entity
 *
 * @author admin
 * @date 2024-08-19 14:13:44
 */
@Data
@TableName("hazard_examine")
public class HazardExamine implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "examine_id", type = IdType.ASSIGN_UUID)
    @Size(max = 32, message = "{noMoreThan}")
    private String examineId;

    /**
     * 公司Id
     */
    @TableField("tenant_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String tenantId;

    /**
     * 检查编号;年+公司编码+序列号（5位）
     */
    @TableField("examine_no")
    @NotBlank(message = "{required}")
    @Size(max = 64, message = "{noMoreThan}")
    private String examineNo;

    /**
     * 检查类别;1：日常 2：专项
     */
    @TableField("examine_category")
    @NotNull(message = "{required}")
    private Integer examineCategory;

    /**
     * 检查类型;1：公司检查 2：部门检查 3：车间检查 4：班组检查 5：项目检查
     */
    @TableField("examine_type")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String examineType;

    /**
     * 检查标题
     */
    @TableField("examine_title")
    @NotBlank(message = "{required}")
    @Size(max = 500, message = "{noMoreThan}")
    private String examineTitle;

    /**
     * 开始时间
     */
    @TableField("start_date")
    @NotNull(message = "{required}")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startDate;

    /**
     * 结束时间
     */
    @TableField("end_date")
    @NotNull(message = "{required}")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

    /**
     * 检查备注
     */
    @TableField("remark")
    @Size(max = 800, message = "{noMoreThan}")
    private String remark;

    /**
     * 状态;1：待提交 2：待检查 3：进行中 4：已结束
     */
    @TableField("status")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String status;

    /**
     * 新增人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 新增时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 修改人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

}